#ifndef _HEAD_H
#define _HEAD_H
#include<my_head.h>
#endif

#ifndef _QUEUEMANAGER_H
#define _QUEUEMANAGER_H
#include"../allqueue/queueManager.h"
#endif

#ifndef _THREAD_H
#define _THREAD_H
#include"thread.h"
#endif



#define MAX_THREAD_SIZE 3
#define MAX_COND_SIZE 1
#define MAX_LOCK_SIZE 1
typedef struct UserManager User_manager;
typedef struct threadManager
{

    pthread_t * pt_id;
    pthread_mutex_t _lock[MAX_LOCK_SIZE];
    pthread_cond_t cond[MAX_COND_SIZE];
    int idleThreadNum;
    queueManager qManager;
    User_manager * umanager;

}thread_manager;
//给线程池里的所有变量初始化
void initThreadPool(thread_manager * tma);
//线程池中全部变量启动
void startThreadPool(thread_manager * tma);
//线程分配任务
bool distributeTask(thread_manager * tma);


